package com.zzxx.shooter;

import java.awt.image.BufferedImage;

public class Airplane extends FlyingObject implements Enemy{
    private int speed;
    public Airplane(){
        x = (int)(Math.random()*ShootGame.WIDTH);
        y = 0;
        image = ShootGame.airplane0;
        width = image.getWidth();
        height = image.getHeight();
        speed = 2;
        life = 1;
        emberImages = new BufferedImage[]{ShootGame.airplane_ember0, ShootGame.airplane_ember1, ShootGame.airplane_ember2, ShootGame.airplane_ember3};
    }

    public int getScore(){
        return 10;
    }

    public boolean outOfBound(){
        return y > 650;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public int getLife() {
        return life;
    }


    @Override
    public void step() {
        this.y += speed;
    }

}
